package com.example.demo;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Mono;

/**
 * @author Yang Shuai
 * @date 2020/11/23 9:38
 */
@RefreshScope
@RestController
public class DemoController {

    @Value("${env.data}")
    private String data;

    @GetMapping("/test")
    public Mono<String> test(){
        return Mono.just(data);
    }
}
